import { useState, useEffect } from 'react';
import { dataType } from 'src/services/api/common';
export default function useDataType() {
  const [types, setTypes] = useState([]);
  useEffect(() => {
    dataType.list().then((res) => {
      setTypes(res.data);
    });
  }, []);
  return types;
}
